<?php
/**
 * WX端的接口
 */


//用户
$router->get('token', 'UserController@getToken');
//上传
$router->post('upload', 'UploadController@setUpload');
//首页视频
$router->group(['prefix'=>'video'], function () use ($router) {
    $router->post('one', 'VideoController@getOne');
    $router->post('onebyid', 'VideoController@getOneById');
    $router->post('farm/apply', 'VideoController@setFarmApply'); //领取
    $router->post('mc/one', 'VideoController@getMacha'); //码查
    $router->post('zan', 'VideoController@setZan'); //点赞
    $router->post('fx/add', 'VideoController@setFxAdd'); //分享
    $router->post('pl/index', 'PlController@getIndex'); //评论
    $router->post('pl/add', 'PlController@setAdd');
});
//扫码物品
$router->post('code/add', 'ThingController@setCodeAdd');
$router->post('cate/index', 'ThingController@getCateIndex');
$router->post('cate/add', 'ThingController@setCateAdd');
$router->post('thing/onebycode', 'ThingController@getOneByCode');
$router->post('thing/add', 'ThingController@setAdd');
//我的页面
$router->group(['prefix'=>'my', 'namespace'=>'Mys'], function () use ($router) {
    //用户信息
    $router->post('user/one', 'UserController@getOne');
    $router->post('user/uname/modify', 'UserController@setUname');
    $router->post('user/guo/apply', 'UserController@setGuoApply');
    $router->post('user/shop/apply', 'UserController@setShopApply');
    //视频
    $router->post('video/index', 'VideoController@getIndex');
    $router->post('video/like/index', 'VideoController@getLikeIndex');
    $router->post('video/pl/index', 'VideoController@getPlIndex');
    $router->post('video/pl/one', 'VideoController@getPlOne');
    $router->post('video/fx/index', 'VideoController@getFxIndex');
    $router->post('video/fx/one', 'VideoController@getFxOne');
    //我的橱窗
    $router->post('thing/index', 'MyController@getThingIndex');
    $router->post('thing/trade/index', 'MyController@getTradeIndex'); //交易榜
    //果农养护
    $router->post('guo/index', 'GuoController@getIndex'); //果树
    $router->post('guo/group/index', 'GuoController@getGroupIndex'); //养护组合
    $router->post('guo/groupno/index', 'GuoController@getGroupNoIndex'); //果树无组合
    $router->post('guo/group/add', 'GuoController@setGroupAdd'); //养护组合
    $router->post('guo/tree/add', 'GuoController@setTreeAdd'); //果树新增
    $router->post('guo/tree/del', 'GuoController@setTreeDel'); //果树删除
    $router->post('guo/task/index', 'GuoController@getTaskIndex'); //养护任务
    $router->post('guo/task/add', 'GuoController@setTaskAdd'); //养护任务
    $router->post('guo/task/del', 'GuoController@setTaskDel'); //删除任务
    $router->post('guo/crop/index', 'GuoController@getCropIndex'); //收成列表
    $router->post('guo/crop/add', 'GuoController@setCropAdd'); //收成新增
    $router->post('guo/crop/modify', 'GuoController@setCropModify'); //收成新增
    $router->post('guo/crop/del', 'GuoController@setCropDel'); //收成删除
    //我的农场
    $router->post('farm/tree/index', 'FarmController@getTreeIndex');
});